SetConstraint

Alias for check constraint that makes sure the property that has this attribute only contains members in the set. This should act like the SET constraint in MySQL. It will sort and remove the duplicates of the SET. This does modify the value coming in. This is only for strings.

If isStrict is true, SetConstraint will return false if you include a value not in the set. If isStrict is false, the value will be set to an empty string.

  1. template SetConstraint(values...)
    template SetConstraint (
    values...
    ) if (
    isExpressions!values
    ) {}
  2. template SetConstraint(bool isStrict, values...)

Members

Aliases

SetConstraint
alias SetConstraint = SetConstraint!(true, values)
Undocumented in source.

Meta

Version

\>= 0.0.6 for isStrict option. \>= 0.0.4 is always strict.